"乱码设置
"-----------------------------------------------------------------
let &termencoding=&encoding
set fileencodings=utf-8,gbk,gb18030,gb2312,cp936,ucs-bom,latin1

"常用设置
"-----------------------------------------------------------------
set showmatch                    "高亮显示匹配的括号
set matchtime    =2              "高亮括号的闪烁时间
set shiftwidth   =4              "自动缩进符
set tabstop      =4              "tab制表符
set softtabstop  =4              "4个空格符视为tab符
set expandtab                    "tab符视为空格符
set smarttab                     "使用退格键时辨别tab
set number                       "行号显示
set cursorline                  "突出显示当前行
set lbr                          "折行显示时不折断单词
set guifont=JetBrains_Mono_NL:h16         "JetBrains Mono NL字体和16字号
"set guifont=Consolas:h16         "Consolas字体和16字号
"set guifont=Courier_New:h16     "Courier_New字体和16字号
"set guifont=新宋体:h16:cGB2312   "新宋体，16字号，gb2312编码方式
"set nobackup                     "不生成备份文件~
"set noswapfile                   "不生成交换文件.swp
"set lines=30 columns=100        "启动时窗口大小设置
au GUIEnter * simalt ~x          "启动时窗口最大化
"set nowrap                      "不折行
"set guioptions+=b               "添加水平滚动条
filetype indent on               "载入相关缩进格式实现自动缩进
set nocompatible
set backspace=indent,eol,start
syntax on
set timeoutlen=100               "解决O插入上一行的延迟问题

"一键编译CPP
map<F5> :call CompileRunGCC() <CR>
func! CompileRunGCC()
    exec "!g++ -o %< -std=c++23 % && ./%<"
endfunc

